Skip to content

Conversation

@mheiber
Copy link
Owner

@mheiber mheiber commented Jul 3, 2018

early work-in-progress from @joeywatts on transpiling private names to target ES2015

@mheiber mheiber changed the title Es2015 transformation (WIP) ES2015 transformation for private properties (WIP, Joe Watts) Jul 3, 2018
Maxwell Heiber and others added 8 commits July 2, 2018 20:11
do a really rough, quick-and-dirty unblock-people job of letting #foo be parse-able.

steps to test:

npm run lint && npm test
See https://bbgithub.dev.bloomberg.com/javascript-guild/typescript-private-fields/ quick start guide for seeing the AST
CI testing coming soon
* jenkinsfile

* add npm run build step

* lint

* baseline change

* accept more baselines

* accept baselines

* fix-scanner

* baselines again
@mheiber mheiber force-pushed the es2015-transformation branch from 54d8ef9 to 1497ca2 Compare July 3, 2018 00:13
@mheiber mheiber changed the base branch from private-fields to master July 3, 2018 01:42
@mheiber mheiber changed the base branch from master to private-fields July 3, 2018 01:43
Joseph Watts added 3 commits July 3, 2018 14:23
Signed-off-by: Joseph Watts <jwatts43@bloomberg.net>
Signed-off-by: Joseph Watts <jwatts43@bloomberg.net>
Signed-off-by: Joseph Watts <jwatts43@bloomberg.net>
@joeywatts joeywatts changed the title ES2015 transformation for private properties (WIP, Joe Watts) ES2015 transformation for private properties (WIP, Joey Watts) Jul 3, 2018
Signed-off-by: Joseph Watts <jwatts43@bloomberg.net>
return visitParenthesizedExpression(node as ParenthesizedExpression, noDestructuringValue);
case SyntaxKind.CatchClause:
return visitCatchClause(node as CatchClause);
case SyntaxKind.PropertyDeclaration:
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did we need to add these new cases? Weren't they visited before?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The esnext transformer didn't need any special behavior with these SyntaxKinds until private names were introduced.

@joeywatts
Copy link
Collaborator

Rebased off of the updated parser code, see new PR #10

@joeywatts joeywatts closed this Aug 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants